import { Exclude, Expose } from "class-transformer";

export class UserEntity{
    id: number;
    email: string;
    username: string;

    @Exclude()
    password: string;

    @Expose()
    get fullName(): string {
    return `${this.username} ${this.id}`;
    }

    constructor(partial: Partial<UserEntity>) {
        Object.assign(this, partial);
    }
}